#ifndef LOADDBC_H
#define LOADDBC_H

#include "dbc.h"
#include <QString>

class loadDbcClass
{
private:
    qint64 fileLineCnt;
    bool isEmptyLine(QString &line);
    bool isNsStart(QString &line);
    bool isBsStart(QString &line);
    bool loadVersion(QString &line,dbcClass &dbc,qint64 lineNo);
    void loadNewSymbol(QString &line,dbcClass &dbc);
    void loadBs(QString &line,dbcClass &dbc);
    bool loadNode(QString &line,dbcClass &dbc);
    bool loadMsg(QString &line,dbcClass &dbc,qint64 lineNo);
    bool loadCom(QString &line,dbcClass &dbc,qint64 lineNo);
    bool loadSigExValueType(QString &line,dbcClass &dbc,qint64 lineNo);
    void updateExValType(dbcClass &dbc);
public:
    loadDbcClass();
    void load(QString &dbcPath, dbcClass &dbc);
};

#endif // LOADDBC_H
